package com.licq.ldoc.domain;

import com.licq.ldoc.writer.visitor.Visitor;
import com.lowagie.text.BadElementException;

public class Attribute extends AbstractNode {
    private AttributeType type;

    public Attribute(String name, AttributeType type, Occurrencies occurrencies, boolean required) {
        this.name = name;
        this.type = type;
        this.occurrences = occurrencies;
        this.required = required;
    }
    
    public Attribute(String name, AttributeType type, Occurrencies occurrencies) {
    	this(name, type, occurrencies, false);
	}

	public AttributeType getType() {
        return type;
    }

    public void setType(AttributeType type) {
		this.type = type;
	}

	public void accept(Visitor visitor) throws BadElementException {
        visitor.visit(this);
    }
}
